﻿// -----------------------------------------------------------------------
// <copyright file="SubscriberPartial.cs" company="Zen Design Corp">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Zen.BlackBerry.Subscription
{
	/// <summary>
	/// Represents a subscriber to a push application, with only a subset of
	/// the subscriber's details.
	/// </summary>
	/// <remarks>
	/// This class is particularly useful for FindBy methods which do not
	/// require that a full object be returned.
	/// </remarks>
	public class SubscriberPartial
	{
		/// <summary>
		/// Gets or sets the address.
		/// </summary>
		/// <value>The address.</value>
		public string Address
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the subscriber id.
		/// </summary>
		/// <value>The subscriber id.</value>
		public string SubscriberId
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the push application id.
		/// </summary>
		/// <value>The push application id.</value>
		public string PushApplicationId
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the status.
		/// </summary>
		/// <value>The status.</value>
		public SubscriberStatus Status
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the type.
		/// </summary>
		/// <value>The type.</value>
		public SubscriberType Type
		{
			get;
			set;
		}

		/// <summary>
		/// Gets the subscriber key.
		/// </summary>
		/// <returns></returns>
		public SubscriberPrimaryKey GetKey()
		{
			return new SubscriberPrimaryKey(PushApplicationId, SubscriberId);
		}
	}
}
